import axios from 'axios';

const API_URL = 'http://localhost:8000/api/sales/orders/';

export const getSalesOrders = () => axios.get(API_URL);
export const createSalesOrder = (order) => axios.post(API_URL, order);
export const updateSalesOrder = (id, status) => {
    return axios.patch(`${API_URL}${id}/`, {status: status});
};
export const deleteSalesOrder = (id) => axios.delete(`${API_URL}${id}/`);

export const generateSalesReport = () =>{
    return axios.get(`${API_URL}generate_sales_report/`)
}